package warmachineroster.presentation.command;

import org.eclipse.gef.commands.Command;

import warmachineroster.RosterElement;
import warmachineroster.UnitRosterElement;

public class UnitAttachmentRosterElementCreateCommand extends Command {

	private RosterElement unitAttachmentRosterElement;
	private UnitRosterElement unitRosterElement;

	public void setUnitAttachmentRosterElement(RosterElement unitAttachmentRosterElement) {
		this.unitAttachmentRosterElement = unitAttachmentRosterElement;
	}

	public void setUnitRosterElement(UnitRosterElement unitRosterElement) {
		this.unitRosterElement = unitRosterElement;
	}

	@Override
	public void execute() {
		unitRosterElement.getUnitAttachment().add(unitAttachmentRosterElement);
	}

	@Override
	public void undo() {
		unitRosterElement.getUnitAttachment().remove(unitAttachmentRosterElement);
	}
	
	

}
